<template>
<div class="resultWrapper">
  <div class="head">
    当前位置：成果维护> <span>新增成果</span>
  </div>
  <div class="content">
    <div class="baseInfo">
      <div class="headText flex">
        <span class="flex200">基础信息</span>
      </div>
      <div class="contentList">
        <ul class="flex">
          <li class="flex"><div class="flex90">获奖类别：</div><div class="flex1 select "><input type="text"></div></li>
          <li class="flex"><div class="flex90">获奖类别：</div><div class="flex1 select "><input type="text"></div></li>
          <li class="flex"><div class="flex90">获奖类别：</div><div class="flex1 select "><input type="text"></div></li>
          <li class="flex"><div class="flex90">获奖类别：</div><div class="flex1 select "><input type="text"></div></li>
          <li class="flex"><div class="flex90">获奖类别：</div><div class="flex1 select "><input type="text"></div></li>
          <li class="flex"><div class="flex90">获奖类别：</div><div class="flex1 select "><input type="text"></div></li>
          <li class="flex"><div class="flex90">获奖类别：</div><div class="flex1 select "><input type="text"></div></li>
          <li class="flex"><div class="flex90">获奖类别：</div><div class="flex1 select "><input type="text"></div></li>
          <li class="flex"><div class="flex90">获奖类别：</div><div class="flex1 select "><input type="text"></div></li>
          <li class="flex"><div class="flex90">获奖类别：</div><div class="flex1 select "><input type="text"></div></li>
          <li class="flex"><div class="flex90">获奖类别：</div><div class="flex1 select "><input type="text"></div></li>
          <li class="flex"><div class="flex90">获奖类别：</div><div class="flex1 select "><input type="text"></div></li>
        </ul>
      </div>
    </div>

    <!--论文上传-->
    <div class="baseInfo">
      <div class="headText flex">
        <span @click="do_selectNav(index)" class="flex200 upNav" v-for="(item,index) in upLoad" :key="index" v-text="item" :id="index==upNavIndex?'currentNav':''">上传论文</span>
      </div>
      <div class="padding20 ">
            <div class="flex upPaper">
              <div class="upPaperL flex400 relt">
                 <div class="upPaperLTitle">显示文档：</div>
                <div class=" upPaperContent" >
                  <div v-html="myiframe" class="myIframe"> </div>
                </div>
              </div>
              <div class="upPaperR flex1 relt">
                <div class="upPaperLTitle">文字内容检索：</div>
                <div class=" upPaperContent" ></div>
              </div>
            </div>
        <div class="colorBlue">
          <span> <span class="iconfont icon-shangchuan"></span> <span>继续上传</span></span>
          （目前仅支持doc,docx,pdf后缀的文件）
        </div>
      </div>
    </div>
    <!--详细信息-->
    <div class="baseInfo">
      <div class="headText flex">
        <span class="flex200">详细信息</span>
      </div>
      <div class="padding20">
        <div class="flex infoDetail"><span>管理员：</span> <input type="text"> </div>
        <div class="flex infoDetail"><span>简介：</span> <textarea class="flex1" ></textarea> </div>
      </div>
    </div>
    <!--管理人员设置-->
    <div class="baseInfo">
      <div class="headText flex">
        <span class="flex200">管理人员设置</span>
      </div>
      <div class="padding20">
        <div class="flex infoDetail"><span>管理员：</span> <input type="text"> </div>
        <div class="flex infoDetail"><span>联系方式：</span> <input type="text"> </div>
      </div>
    </div>
    <!--附件-->
    <div class="baseInfo">
      <div class="headText flex">
        <span class="flex200">上传附件</span>
        <div class="flex1 flex">
          <div >
            <span> <span class="iconfont icon-shangchuan"></span> <span>继续上传</span></span>
            （目前仅支持doc,docx,pdf后缀的文件）
          </div>
        </div>
      </div>
      <!--附件上传-->
      <div class="padding20">
        <div>
          <detail-attach :attachmentList="attachmentList" :isResult="isResult"></detail-attach>
        </div>
      </div>
    </div>
    <div class="f-zhong">
      <button class="btn">提交</button>
    </div>

  </div>
</div>
</template>

<script>
  import detailAttach from '../../cgkSubjectDetail/detail-attach'
  // import detailAttach from  '../../BS_cgkLogin'
    export default {
        name: "cm_addNewResult",
      components:{
        detailAttach:detailAttach
      },
      data(){
          return{
            myiframe:'',
            upNavIndex:0,
            upLoad:["上传全文","成果背景","成果内容","成果创新","成果效果","问题与思考"],
            isResult:true,
            attachmentList:[
              {title:'斯蒂芬多少',size:'50kb' ,type:'word'},
              {title:'斯蒂芬多少标题',size:'105kb',type:'word'}
            ]//附件
          }
      },
      created(){
          let src='http://ow365.cn/?i=16911&furl=http%3a%2f%2fosstest.ezcsoft.com%2ftzc%2fgTHhoJ51lfhzuKmJtMqEIbhCM1gitXdW.docx'
       this.myiframe=`<iframe class= "iFrameHomePage" scrolling='none' src= "${src}" style="width:100%;height: 290px;border: none"></iframe>`
      },
      methods:{
        do_selectNav(index){
          this.upNavIndex=index
        }
      }
    }
</script>

<style scoped>
  ul{
    margin: 0;
  }
.head{
  height: 50px;
  line-height: 50px;
  color: #418EFD;
}
.content{
  position: absolute;
  top: 120px;
  /*border: 2px solid red;*/
  bottom: 0;
  overflow: auto;
}
 .content .headText{
   height: 40px;
   line-height: 40px;
   background-color: #FAFAFA;
   padding: 0 10px 0 30px;
   border: 1px solid #F2F2F2;
   box-sizing: border-box;
 }
.content .headText span{
  color: #418EFD;
}
  .contentList ul li{
    height: 50px;
    width: 25%;
    /*border: 1px solid;*/
    box-sizing: border-box;
    align-items: center;
    padding-left: 30px;
  }
.contentList ul{
  background-color: white;
  width: 100%;
  flex-wrap: wrap;
  padding: 20px 30px 20px 0px;
}

  .flex90{
    width: 80px;
  }
  .contentList .select{
    height: 30px;
    line-height: 30px;
    border: 1px solid #CCCCCC;
    box-sizing: border-box;
  }
.contentList .select input{
  width: 100%;
  height:28px;
  position: relative;
  top: -1px;
  border: none;

}
  .headText>.flex1,.colorBlue{
    color: #418EFD;
  }
  .headText>.flex1>div{
    margin-left: auto;
  }
  .headText>.flex1>div>span:first-child,.colorBlue>span:first-child{
    cursor: pointer;
  }
  .icon-shangchuan{
    font-size: 19px;
    margin-right: 4px;
  }
  .padding20{
    padding: 20px 20px 20px 30px;
    background-color: white;
  }
  .content .headText .upNav{
    color: #6D6D6D;
    margin-right: 45px;
    cursor: pointer;
  }
  #currentNav{
    color:#418EFD ;
    border-bottom: 2px solid #418EFD;
  }
  .flex400{
    flex: 0 0 450px;
    margin-right: 40px;
  }
.upPaper{
  height: 360px;
}
  .upPaper .upPaperContent{
    position: absolute;
    left: 0;
    top: 30px;
    bottom: 10px;
    right: 10px;
    border: 1px solid #CCCCCC;
    overflow: auto;
  }
  .infoDetail{
    /*height: 50px;*/
    line-height: 50px;
    /*align-items: center;*/
  }
  .infoDetail>span{
    width: 80px;
  }
  .infoDetail>input{
    height: 30px;
    line-height: 30px;
    border: 1px solid #cccccc;
    width: 300px;
    margin-top: 10px;
  }
  textarea{
    min-height: 100px;
    border: 1px solid #cccccc;
  }
  .btn{
    width: 350px;
    height: 40px;
    color: white;
    background-color: #418DFD;
    border-radius: 5px;
  align-items: center;
    margin: 40px 0;
  }
  .myIframe{
    width: 620px;
    /*height: 100%;*/
  }
</style>
